import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import Home from './components/tabbars/HomeContainer.vue'
import Member from './components/tabbars/MemberContainer.vue'
import Shop from './components/tabbars/CartContainer.vue'
import Setting from './components/tabbars/SetContainer.vue'

import List from './components/news/newsList.vue'
import Info from './components/news/newsInfo.vue'
import Photo from './components/pnotos/phoneList.vue'
import Photoinfo from './components/pnotos/photoinfo.vue'

import goodlist from './components/goods/goodslist.vue'
import goodsInfo from './components/goods/goodsInfo.vue'
import goodsDesc from './components/goods/goodsDesc.vue'
import goodscomment from './components/goods/goodsComment.vue'

const router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' },
        { path: '/home', component: Home },
        { path: '/member', component: Member },
        { path: '/shopcar', component: Shop },
        { path: '/set', component: Setting },
        { path: '/home/newslist', component: List },
        { path: '/home/newslist/:id', component: Info, props: true },
        { path: '/home/photolist', component: Photo },
        { path: '/home/photoInfo/:id', component: Photoinfo, props: true },
        { path: '/home/goodlist', component: goodlist },
        { path: '/home/goodsInfo/:id', component: goodsInfo, props: true },
        { path: '/home/goodsDesc', component: goodsDesc },
        { path: '/home/goodscomment', component: goodscomment }


    ]
})

export default router